<div ng-include="'web/include/header_menu.html'"></div>
<!--主体内容-->
<div class="content row" >
    <div class="my-main">
        <!--右侧表格-->
        <div class="right-main">
            <div class="col-sm-12 groupBtn">
                <button type="button" class="btn btn-info"  ng-click="setResources()" zg-access="roles/getAllResourceWithTenanId">分配权限</button>
                <button type="button" class="btn btn-info" ng-click="deleteRole()" zg-access="roles/delete">删除角色</button>
                <button type="button" class="btn btn-info"  data-toggle="modal"  data-target="#addForm" zg-access="roles/add">新增角色</button>
            </div>
            <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="roleTable" style="width:100%">
                <thead>
                <tr>
                    <td>请选择</td>
                    <td>ID</td>
                    <td>角色名称</td>
                </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
            <!--确认删除用户的弹框-->
            <div class="modal fade bd-example-modal-sm" id="deleteSure" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"  data-backdrop="static">
                <div class="modal-dialog modal-sm">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title">删除用户</h4>
                        </div>
                        <div class="modal-body">
                            <p>您确认删除该用户吗？</p>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <button type="button" class="btn btn-primary" ng-click="sureDelete()">确定</button>
                        </div>
                    </div>
                </div>
            </div>
            <!--分配权限的弹框-->
            <div class="modal fade bd-example-modal-sm" id="selectResources" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"  data-backdrop="static">
                <div class="modal-dialog modal-sm">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title">分配权限</h4>
                        </div>
                        <div class="modal-body">
                            <ul tree class="ztree" ng-model="selectNode" id="treeDemo"></ul>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <button type="button" class="btn btn-primary" ng-click="saveResources()">确定</button>
                        </div>
                    </div>
                </div>
            </div>
            <!--添加角色的弹框-->
            <div aria-labelledby="addroleLabel" class="modal fade" id="addForm" role="dialog" tabindex="-1" data-backdrop="static">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="addroleLabel">添加角色</h4>
                        </div>
                        <div class="modal-body">
                            <form id="roleForm">
                                <div class="form-group">
                                    <label class="control-label">角色名称:</label>
                                    <input class="form-control" ng-model="roledesc" placeholder="请输入角色名称" type="text" value="" minlength="1" maxlength="255"/>
                                </div>
                            </form>
                        </div>
                        <div class="modal-footer">
                            <button class="btn btn-default" ng-click="close()" type="button">取消</button>
                            <button class="btn btn-primary" ng-click="sureRole();" type="button">确定</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--尾部-->
<div ng-include="'web/include/footer.html'"></div>